import os
import sys

targetDirectory = "lemonpack/" + input()

if targetDirectory[-1] == '/':
    targetDirectory = targetDirectory[:-1]

os.system("mkdir -p " + targetDirectory)
os.system("mkdir -p " + targetDirectory + "/data")
os.system("mkdir -p " + targetDirectory + "/sample")
os.system("mkdir -p " + targetDirectory + "/source/std")

while True:
    args = list(input().split())
    directory, short = args[0], args[1]
    
    os.system("mkdir -p " + targetDirectory + "/data/" + short)
    os.system("mkdir -p " + targetDirectory + "/sample/" + short)
    os.system("mkdir -p " + targetDirectory + "/source/std/" + short)

    dataDirectory = directory + "/tests"
    testfiles = os.listdir(dataDirectory)
    for file in testfiles:
        if 'samples' in file:
            os.system('cp ' + dataDirectory + '/' + file + ' ' + targetDirectory + '/sample/' + short + '/' + file)
        else:
            os.system('cp ' + dataDirectory + '/' + file + ' ' + targetDirectory + '/data/' + short + '/' + file)
    
    os.system('cp {}/std.cpp {}/source/std/{}/{}.cpp'.format(directory, targetDirectory, short, short))

    if 'spj' in args:
        os.system('cp {}/checker.cpp {}/data/{}/checker.cpp'.format(directory, targetDirectory, short))